import java.util.Scanner;

public class CycleFor {
    public static void outNumbersDivOnTwoThree(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        String out="";
        for (int i=1; i<=num; i++) {
            if (i % 2 == 0 && i % 3 == 0) {
                out += i + " ";
            }
        }
        if (out.isEmpty()){
            out = "Таких чисел нет";
        }
        System.out.println(out);
    }

    public static void printNumbersRepeatedNTime(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt(), repeat = sc.nextInt();
        for (int i=0; i < repeat; i++){
            System.out.printf("%s ", num);
        }
    }
    public static void printNumbersRepeatedNTimeFasterAlternative(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt(), repeat = sc.nextInt();
        sc.close();
        StringBuilder str = new StringBuilder();
        for (; repeat>0; repeat--){
            str.append(num).append(" ");
        }
        System.out.println(str);

    }

    public static void printStarsFigures(String[] args) {
        Scanner sc = new Scanner(System.in);
        int h = sc.nextInt(), w = sc.nextInt();
        sc.close();
        for (; h>0; h--){
            for (int i = 1; i<=w; i++){
                System.out.print("*");
            }
            System.out.println();
        }
    }
    public static void printStarsFiguresElegantAlternative(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt(), y = sc.nextInt();
        for (int i = 1; i <=x*y; i++)
            System.out.print((i%y==0)? "*\n" : "*");
    }

    public static void printNumInExponent(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int num = sc.nextInt();
            String out = "";
            for (int i = 2; i <= 5; i++) {
                if (i == 5)
                    System.out.println(out+= (int) Math.pow(num, i));
                out += (int) Math.pow(num, i) + " ";
            }
        }
    }

    public static void printChristmasTree(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), i;
        String str ="";
        for (i = 1; i<=n; i++){
            str += i;
            System.out.println(str);
            str+=" ";
        }

    }

    public static void temp(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), i, j, stop=0;
        String str ="";
        for (i = 1; i<=n; i++){

            for (j = 1; j<=i; j++ ){
                if (stop >= n) break;
                str += i + " ";
                stop+=1;
            }
        }
        System.out.println(str);

    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), i, j;
        String str ="";
        for (i = 1; n>0; i++){
            for (j = 1; j<=i && n>0; j++ , n--){

                str += i;
                System.out.println(str);
                str +=" ";
            }

        }


    }
}

